Skip to content

adds ceiling and floor overflow/underflow tests#87

Open
raleigh-g-thompson wants to merge 1 commit intomainfrom
enhancement/ceiling-floor-overflow-null-check
Open

adds ceiling and floor overflow/underflow tests#87
raleigh-g-thompson wants to merge 1 commit intomainfrom
enhancement/ceiling-floor-overflow-null-check

Conversation

@raleigh-g-thompson
Copy link
Contributor

fixes #30

<output>null</output>
</test>
<test name="CeilingIntegerGreaterThanMaxInteger" version="1.0">
<expression>Ceiling(2147483648)</expression>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this expression? I think it might actually be invalid?

Copy link
Contributor Author

@raleigh-g-thompson raleigh-g-thompson Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, SmileCDR returns this

 {
    "severity": "error",
    "details": {
        "text": "Bad format for Integer literal"
    }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be marked as a semantic or runtime issue?

<output>-2147483648</output>
</test>
<test name="CeilingIntegerLessThanMinInteger" version="1.0">
<expression>Ceiling(-2147483649)</expression>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, seems like this would blow up in the parser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests for underflow & overflow for ceiling & floor operators

2 participants